{% extends "admin/base_site.html" %}
{% load i18n admin_urls static admin_modify %}

{% block extrahead %}{{ block.super }}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}">
</script>
<script>
</script>
{{ media }}
{% endblock %}

{% block extrastyle %}{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />
<style>
    #users {
        width: 720px;
        height: 200px;
    }
</style>
{% endblock %}

{% block coltype %}colM{% endblock %}

{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; 产品分发
</div>
{% endblock %}
{% endif %}

{% block content %}
<div id="content-main">

    <div>
        <p>
            <font color="blue">
                {% for pm in prompt_msgs %}
                {{ pm }}<br>
                {% endfor %}
            </font>
        </p>
        <table class="table">
            <tr>
                <td>
                    产品名：{{ product.name }}
                </td>
            </tr>
            <tr>
                <td>
                    发行量：{{ product.publish_count }}
                </td>
            </tr>
            <tr>
                <td>
                    价格：{{ product.pre_sale_price }}元
                </td>
            </tr>
            <tr>
                <td>
                    当前平均价：{{ product.avg_price_custom }}元
                </td>
            </tr>
        </table>
    </div>

    <div>
        <label>请输入要设置的价格</label>
        <p>
            <font color="red">
                {% for em in error_msgs %}
                {{ em }}<br>
                {% endfor %}
            </font>
        </p>
        <form class="form-horizontal" method="post">
            {% csrf_token %}
            <input type="hidden" name="product_id" value="{{ product.pk }}">
            <label>价格：</label><input type="number" value="{{ avg_price_custom }}" step="0.01" name="avg_price_custom">
            <button type="submit" class="btn">确认提交</button>
        </form>
    </div>

</div>
{% endblock %}



